package com.lichuandi.controller;

import com.lichuandi.domain.AjaxResult;
import com.lichuandi.domain.Devices;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;

@RestController
@RequestMapping("/api")
public class ApiController {

    @PostMapping("/control")
    public AjaxResult testController(@RequestBody Devices devices) {

        devices.setClassName("test");
        devices.setModel("test");
        devices.setFunctionName("test");
        System.out.println(devices);
        return AjaxResult.success(devices);
    }
}
